40e3bfcd99a80fca9fed1c378018744d46aa6285,src/java/com/mockey/storage/InMemoryMockeyStorage.java,InMemoryMockeyStorage,findServiceBasedOnUrlPattern,#String#Service#,257
Before Change
Iterator<Url> altUrlIter = serviceUrlList.iterator();
while (altUrlIter.hasNext()) {
Url altUrl = altUrlIter.next();
results = template.match(altUrl.getFullUrl());
if(results.size() > 0){
// Possible match
foundService = serviceToEvaluate;
After Change
// The template is matched against the service real URLs,
// therefore the match always succeeds. The template should be
// matched against the url of the request instead.
template = new UriTemplate(altUrl.getFullUrl());
results = template.match(url);
if (results.size() > 0) {
// Possible match